package com.loongtech.bi.action.bigame;

import com.loongtech.bi.action.BaseBiSearchAction;
import com.loongtech.bi.action.game.TaskGameAction;
import com.loongtech.bi.manager.game.TaskGameManager;
import com.loongtech.bi.manager.system.GameParamConfigManager;
import com.loongtech.bi.support.CommonGameParam;
import com.loongtech.bi.support.chart.ChartTool;
import com.loongtech.bi.support.chart.ChartType;
import com.loongtech.bi.support.chart.ChartUIData;
import com.loongtech.core.util.Time;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.*;

import static com.loongtech.bi.manager.system.GameParamConfigManager.ALL_FLAT;
import static com.loongtech.bi.manager.system.GameParamConfigManager.ALL_FLAT_INT;

/**
 * 游戏内分析-任务分析Action
 * @author Marin
 * @date 2015年09月17日
 */
@Controller
@Scope("session")
@RequestMapping("/game/taskGame")
public class TaskGameBiAction extends BaseBiSearchAction {
	private static final long serialVersionUID = 1L;
    private int queryTaskType = ALL_FLAT_INT;  // 前端传过来的查询条件：任务类型
    private int queryTaskName = ALL_FLAT_INT;  // 前端传过来的查询条件：任务名称

    /*111private int queryTaskType1 = ALL_FLAT_INT;  // 前端传过来的查询条件：任务类型
    private int queryTaskName1 = ALL_FLAT_INT;  // 前端传过来的查询条件：任务名称*/

    private Map<String, String> taskTypeItmes = GameParamConfigManager.getItems(CommonGameParam.TASK_TYPE); // 任务类型
    private Map<String, String> taskTypeItmesRevise = GameParamConfigManager.getItemsRevise(CommonGameParam.TASK_TYPE);

    private Map<String, String> taskNameItmes = GameParamConfigManager.getItems(CommonGameParam.TASK_NAME); // 任务名称
    private Map<String, String> taskNameItmesRevise = GameParamConfigManager.getItemsRevise(CommonGameParam.TASK_NAME);

    private Map<String, String> uiTaskNameItmes = getUITaskName(queryTaskType);

    /*111private Map<String, String> uiTaskNameItmes1 = getUITaskName(queryTaskType1);*/


    private Date dayDate = new Date(Time.getBeginningOfDay(Time.currentTime() - Time.DAY));  // 前端传过来的开始时间

   /* 111private Date dayDate1 = new Date(Time.getBeginningOfDay(Time.currentTime() - 2 * Time.DAY));
    private String queryPlatform1 = "0";  // 前端传过来的查询条件：平台
    private String queryChannel1 = "0";  // 前端传过来的查询条件：渠道
    private String queryServer1 = "0";  // 前端传过来的查询条件：区服

    private Map<String, String> platformItmes1;  // 平台下拉列表
    private Map<String, String> channelItmes1;  // 渠道下拉列表
    private Map<String, String> serverItmes1;  // 区服下拉列表*/

    private List<TaskGameManager.TaskActiveOrNewUserStatus> activeUserTaskCompleteds; // 活跃用户完成情况
    private List<TaskGameManager.TaskActiveOrNewUserStatus> newUserTaskCompleteds; // 新增用户完成情况
    private List<TaskGameManager.TaskActiveOrLossUserStayRadio> activeUserTaskStayRadios; // 活跃用户停留率
    private List<TaskGameManager.TaskActiveOrLossUserStayRadio> newUserTaskStayRadios; // 新增次日流失停留率

    private ChartUIData activeUserTaskCompletedChart;
    private ChartUIData newUserTaskCompletedChart;

    private List<TaskGameManager.TaskActiveOrNewUserStatus> activeUserTaskCompletedsTran;
    private List<TaskGameManager.TaskActiveOrNewUserStatus> newUserTaskCompletedsTran;
    private ChartUIData activeUserTaskCompletedChartTran;
    private ChartUIData newUserTaskCompletedChartTran;


    //public static Map<String, String> taskOpenLevel = GameParamConfigManager.getItemsRevise(CommonGameParam.TASK_ID_TASK_OPEN_LEVEL);  // 配置的任务开启等级
    public static Map<String, String> taskName = GameParamConfigManager.getItemsRevise(CommonGameParam.TASK_NAME);  // 配置的任务名称
    public static Map<String, String> taskType = GameParamConfigManager.getItemsRevise(CommonGameParam.TASK_TYPE);  // 配置的任务类型
    public static String task_join_status = GameParamConfigManager.getItemsRevise(CommonGameParam.TASK_JOIN_STATUS).keySet().toArray()[1].toString();  // 副本参与状态ID
    public static String task_pass_status = GameParamConfigManager.getItemsRevise(CommonGameParam.TASK_PASS_STATUS).keySet().toArray()[1].toString();  // 副本完成状态ID

    public static Map<Integer, Integer> orders = new LinkedHashMap<>();
    
    @Autowired
    private TaskGameManager taskGameManager;

    @RequestMapping(value = "initParam.do", method = {RequestMethod.GET, RequestMethod.POST})
    public void initParam(HttpServletRequest request, HttpServletResponse response, String callback) {
        Map<String, Object> result = new HashMap<>();
        try {
            orders.clear();
            int i = 1;
            for (String s : GameParamConfigManager.getItemsRevise(CommonGameParam.MAIN_TASK_ORDER).keySet()) {
                orders.put(i++, Integer.parseInt(s));
            }

            result.put("res", "0");
            result.put("serverItmes", serverItmes);
            result.put("channelItmes", channelItmes);
            result.put("platformItmes", platformItmes);

            result.put("taskTypeItmes", taskTypeItmes);
            result.put("uiTaskNameItmes", uiTaskNameItmes);

            printToJson(response, result, callback);
        } catch (Exception e) {
            e.printStackTrace();
            result.put("res", "1");
            result.put("msg", e.getMessage());
            printToJson(response, result, callback);
            return;
        }
    }

    @RequestMapping(value = "search.do", method = {RequestMethod.GET, RequestMethod.POST})
    public void search(HttpServletRequest request, HttpServletResponse response, @RequestParam String dsearch, @RequestParam String platform, @RequestParam String channel, @RequestParam String server, @RequestParam String taskType, @RequestParam String taskName, String callback) {
        Map<String, Object> result = new HashMap<>();
        try {
            if (!GameParamConfigManager.isConfiged(CommonGameParam.TASK_NAME)) {
                result.put("res", "1");
                result.put("msg", "没有配置 任务名称 的值 !");
                printToJson(response, result, callback);
                return;
            }
            if (!GameParamConfigManager.isConfiged(CommonGameParam.TASK_TYPE)) {
                result.put("res", "1");
                result.put("msg", "没有配置 任务类型 的值 !");
                printToJson(response, result, callback);
                return;
            }
            if (!GameParamConfigManager.isConfiged(CommonGameParam.TASK_JOIN_STATUS)) {
                result.put("res", "1");
                result.put("msg", "没有配置 任务参与状态ID 的值 !");
                printToJson(response, result, callback);
                return;
            }
            if (!GameParamConfigManager.isConfiged(CommonGameParam.TASK_PASS_STATUS)) {
                result.put("res", "1");
                result.put("msg", "没有配置 副本通过状态ID 的值 !");
                printToJson(response, result, callback);
                return;
            }

            dayDate = Time.formatDate(dsearch, Time.TIMEPATTERN_SIMPLE);
            queryPlatform = platform;
            queryChannel = channel;
            queryServer = server;
            queryTaskType = Integer.parseInt(taskType);
            queryTaskName = Integer.parseInt(taskName);

            List<Integer> selectedTaskName = getSelectedTaskName(queryTaskType, queryTaskName);
       /*111 List<Integer> selectedTaskName1 = getSelectedTaskName(queryTaskType1, queryTaskName1);*/
            Map<String, Map<String, Integer>> activeLevelNumTemp = taskGameManager.getAllActiveOrNewUserByLevel(dayDate, dayDate, queryPlatform, queryChannel, queryServer, true);
            Map<String, Map<String, Integer>> newLevelNumTemp = taskGameManager.getAllActiveOrNewUserByLevel(dayDate, dayDate, queryPlatform, queryChannel, queryServer, false);
        /*111Map<String, Map<String, Integer>> activeLevelNumTemp1 = taskGameManager.getAllActiveOrNewUserByLevel(dayDate1, dayDate1, queryPlatform1, queryChannel1, queryServer1, true);
        Map<String, Map<String, Integer>> newLevelNumTemp1 = taskGameManager.getAllActiveOrNewUserByLevel(dayDate1, dayDate1, queryPlatform1, queryChannel1, queryServer1, false);*/

            List<TaskGameManager.TaskActiveOrNewUserStatus> activeUserTaskCompleteds1 = taskGameManager.getTaskActiveUserStatus(dayDate, dayDate, queryPlatform, queryChannel, queryServer, selectedTaskName, activeLevelNumTemp);
            List<TaskGameManager.TaskActiveOrNewUserStatus> newUserTaskCompleteds1 = taskGameManager.getTaskNewUserStatus(dayDate, dayDate, queryPlatform, queryChannel, queryServer, selectedTaskName, newLevelNumTemp);
       /* 111List<TaskGameManager.TaskActiveOrNewUserStatus> activeUserTaskCompleteds2 = taskGameManager.getTaskActiveUserStatus(dayDate1, dayDate1, queryPlatform1, queryChannel1, queryServer1, selectedTaskName1, activeLevelNumTemp1);
        List<TaskGameManager.TaskActiveOrNewUserStatus> newUserTaskCompleteds2 = taskGameManager.getTaskNewUserStatus(dayDate1, dayDate1, queryPlatform1, queryChannel1, queryServer1, selectedTaskName1, newLevelNumTemp1);
*/
            activeUserTaskCompleteds = new ArrayList<>();
            if (activeUserTaskCompleteds1 != null && activeUserTaskCompleteds1.size() > 0) {
                activeUserTaskCompleteds.addAll(activeUserTaskCompleteds1);
            }
        /*111if (activeUserTaskCompleteds2 != null && activeUserTaskCompleteds2.size() > 0) {
            activeUserTaskCompleteds.addAll(activeUserTaskCompleteds2);
        }*/
            newUserTaskCompleteds = new ArrayList<>();
            if (newUserTaskCompleteds1 != null && newUserTaskCompleteds1.size() > 0) {
                newUserTaskCompleteds.addAll(newUserTaskCompleteds1);
            }
        /*111if (newUserTaskCompleteds2 != null && newUserTaskCompleteds2.size() > 0) {
            newUserTaskCompleteds.addAll(newUserTaskCompleteds2);
        }*/

            if (activeUserTaskCompleteds.size() > 0) {
                activeUserTaskCompletedChart = new ChartUIData();
                activeUserTaskCompletedChart.setJsonType(ChartType.SPLINE.type);
                activeUserTaskCompletedChart.setJsonStr(new ChartTool(activeUserTaskCompleteds, TaskGameManager.TaskActiveOrNewUserStatus.class, "").loadData(activeUserTaskCompletedChart.getJsonType(), true));
            }

            if (newUserTaskCompleteds.size() > 0) {
                newUserTaskCompletedChart = new ChartUIData();
                newUserTaskCompletedChart.setJsonType(ChartType.SPLINE.type);
                newUserTaskCompletedChart.setJsonStr(new ChartTool(newUserTaskCompleteds, TaskGameManager.TaskActiveOrNewUserStatus.class, "").loadData(newUserTaskCompletedChart.getJsonType(), true));
            }

            List<Integer> selectedTaskName2 = new ArrayList<>(orders.values());
            Map<String, Map<String, Integer>> activeLevelNumTemp2 = taskGameManager.getAllActiveOrNewUserByLevel(dayDate, dayDate, queryPlatform, queryChannel, queryServer, true);
            Map<String, Map<String, Integer>> newLevelNumTemp2 = taskGameManager.getAllActiveOrNewUserByLevel(dayDate, dayDate, queryPlatform, queryChannel, queryServer, false);
            List<TaskGameManager.TaskActiveOrNewUserStatus> tatmp = taskGameManager.getTaskActiveUserStatus(dayDate, dayDate, queryPlatform, queryChannel, queryServer, selectedTaskName2, activeLevelNumTemp2);
            List<TaskGameManager.TaskActiveOrNewUserStatus> natmp = taskGameManager.getTaskNewUserStatus(dayDate, dayDate, queryPlatform, queryChannel, queryServer, selectedTaskName2, newLevelNumTemp2);

            tatmp = tatmp == null ? new ArrayList<TaskGameManager.TaskActiveOrNewUserStatus>() : tatmp;
            natmp = natmp == null ? new ArrayList<TaskGameManager.TaskActiveOrNewUserStatus>() : natmp;

            if (tatmp.size() > 0 || natmp.size() > 0) {
                Map<Integer, TaskGameManager.TaskActiveOrNewUserStatus> tamap = new LinkedHashMap<>();
                Map<Integer, TaskGameManager.TaskActiveOrNewUserStatus> namap = new LinkedHashMap<>();
                activeUserTaskCompletedsTran = new ArrayList<>();
                newUserTaskCompletedsTran = new ArrayList<>();
                for (TaskGameManager.TaskActiveOrNewUserStatus t : tatmp) {
                    tamap.put(Integer.parseInt(t.getTaskId()), t);
                }
                for (TaskGameManager.TaskActiveOrNewUserStatus t : natmp) {
                    namap.put(Integer.parseInt(t.getTaskId()), t);
                }
                for (Map.Entry<Integer, Integer> entry : orders.entrySet()) {
                    int nowindex = entry.getKey();
                    int nextindex = nowindex + 1;

                    int nowoid = entry.getValue();
                    Integer nextoid = orders.get(nextindex);
                    if (nextoid == null) {
                        nextoid = GameParamConfigManager.ALL_FLAT_INT;
                    }

                    TaskGameManager.TaskActiveOrNewUserStatus ta = tamap.get(nowoid);
                    TaskGameManager.TaskActiveOrNewUserStatus tan = tamap.get(nextoid);
                    if (ta != null) {
                        activeUserTaskCompletedsTran.add(ta);
                        if (tan != null) {
                            ta.setTranRadio(tan.getPlayUserNum() == 0 ? 0 : (float)(ta.getPlayUserNum() * 1.0 / tan.getPlayUserNum()));
                            if (ta.getTranRadio() > 1) {
                                ta.setTranRadio(1);
                            }
                        }
                    }
                    TaskGameManager.TaskActiveOrNewUserStatus na = namap.get(nowoid);
                    TaskGameManager.TaskActiveOrNewUserStatus nan = namap.get(nextoid);
                    if (na != null) {
                        newUserTaskCompletedsTran.add(na);
                        if (nan != null) {
                            na.setTranRadio(nan.getPlayUserNum() == 0 ? 0 : (float)(na.getPlayUserNum() * 1.0 / nan.getPlayUserNum()));
                            if (na.getTranRadio() > 1) {
                                na.setTranRadio(1);
                            }
                        }
                    }
                }
                if (activeUserTaskCompletedsTran.size() > 0) {
                    activeUserTaskCompletedChartTran = new ChartUIData();
                    activeUserTaskCompletedChartTran.setJsonType(ChartType.SPLINE.type);
                    activeUserTaskCompletedChartTran.setJsonStr(new ChartTool(activeUserTaskCompletedsTran, TaskGameManager.TaskActiveOrNewUserStatus.class, "tranRadio").loadData(activeUserTaskCompletedChartTran.getJsonType(), true));
                }

                if (newUserTaskCompletedsTran.size() > 0) {
                    newUserTaskCompletedChartTran = new ChartUIData();
                    newUserTaskCompletedChartTran.setJsonType(ChartType.SPLINE.type);
                    newUserTaskCompletedChartTran.setJsonStr(new ChartTool(newUserTaskCompletedsTran, TaskGameManager.TaskActiveOrNewUserStatus.class, "tranRadio").loadData(newUserTaskCompletedChartTran.getJsonType(), true));
                }
            }

            result.put("res", "0");
            result.put("activeUserTaskCompletedsTran", activeUserTaskCompletedsTran);
            result.put("activeUserTaskCompletedChartTran", activeUserTaskCompletedChartTran);
            result.put("newUserTaskCompletedsTran", newUserTaskCompletedsTran);
            result.put("newUserTaskCompletedChartTran", newUserTaskCompletedChartTran);
            result.put("activeUserTaskCompleteds", activeUserTaskCompleteds);
            result.put("newUserTaskCompleteds", newUserTaskCompleteds);

            printToJson(response, result, callback);
        } catch (Exception e) {
            e.printStackTrace();
            result.put("res", "1");
            result.put("msg", e.getMessage());
            printToJson(response, result, callback);
        }
    }

    private List<Integer> getSelectedTaskName(int type, int name) {
        List<Integer> result = new ArrayList<>();
        if (name == ALL_FLAT_INT) {
            if (type == ALL_FLAT_INT) {
                for (Map.Entry<String, String> entry : taskTypeItmesRevise.entrySet()) {
                    result.add(Integer.parseInt(entry.getKey()));
                }
            } else {
                String typeName = getTaskType(type);
                for (Map.Entry<String, String> entry : taskTypeItmesRevise.entrySet()) {
                    if (entry.getValue().equals(typeName)) {
                        result.add(Integer.parseInt(entry.getKey()));
                    }
                }
            }
        } else {
            result.add(name);
        }

        return result;
    }

    private Map<String, String> getUITaskName(int type) {
        Map<String, String> result = new LinkedHashMap<>();
        if (type == ALL_FLAT_INT) {
            result = taskNameItmes;
        } else {
            result.put("全部任务名称", ALL_FLAT);

            String typeName = getTaskType(type);
            for (Map.Entry<String, String> entry : taskTypeItmesRevise.entrySet()) {
                if (entry.getValue().equals(typeName)) {
                    result.put(getTaskName(entry.getKey()), entry.getKey());
                }
            }
        }

        return result;
    }

    @RequestMapping(value = "updateTaskType.do", method = {RequestMethod.GET, RequestMethod.POST})
    public void updateTaskType(HttpServletRequest request, HttpServletResponse response, @RequestParam String taskType, String callback) {
        Map<String, Object> result = new HashMap<>();
        try {
            uiTaskNameItmes = getUITaskName(queryTaskType);
            queryTaskName = ALL_FLAT_INT;

            result.put("res", "0");
            result.put("uiTaskNameItmes", uiTaskNameItmes);
            result.put("taskName", queryTaskName);

            printToJson(response, result, callback);
        } catch (Exception e) {
            e.printStackTrace();
            result.put("res", "1");
            result.put("msg", e.getMessage());
            printToJson(response, result, callback);
        }
    }

    @RequestMapping(value = "updateInstanceName.do", method = {RequestMethod.GET, RequestMethod.POST})
    public void updateInstanceName(HttpServletRequest request, HttpServletResponse response, @RequestParam String taskName, String callback) {
        Map<String, Object> result = new HashMap<>();
        try {
            queryTaskName = Integer.parseInt(taskName);

            String typeName = getTaskType(queryTaskName);
            for (Map.Entry<String, String> entry : taskTypeItmes.entrySet()) {
                if (entry.getKey().equals(typeName)) {
                    queryTaskType = Integer.parseInt(entry.getValue());
                    break;
                }
            }

            result.put("res", "0");
            result.put("taskType", queryTaskName);

            printToJson(response, result, callback);
        } catch (Exception e) {
            e.printStackTrace();
            result.put("res", "1");
            result.put("msg", e.getMessage());
            printToJson(response, result, callback);
        }
    }

    /*111public void selectTaskType1() {
        uiTaskNameItmes = getUITaskName(queryTaskType1);
        queryTaskName1 = ALL_FLAT_INT;
    }

    public void selectTaskName1() {
        String typeName = getTaskType(queryTaskName1);
        for (Map.Entry<String, String> entry : taskTypeItmes.entrySet()) {
            if (entry.getKey().equals(typeName)) {
                queryTaskType1 = Integer.parseInt(entry.getValue());
                break;
            }
        }
    }*/


    public String getTaskType(Object itemType) {
        String key = itemType == null ? "" : Math.abs(Integer.parseInt(itemType.toString())) + "";
        return (taskTypeItmesRevise.get(key) == null) ? key : taskTypeItmesRevise.get(key);
    }

    public String getTaskName(Object itemType) {
        String key = itemType == null ? "" : Math.abs(Integer.parseInt(itemType.toString())) + "";
        return (taskNameItmesRevise.get(key) == null) ? key : taskNameItmesRevise.get(key);
    }

    @RequestMapping(value = "updateServer.do", method = {RequestMethod.GET, RequestMethod.POST})
    public void updateServer(HttpServletRequest request, HttpServletResponse response, String server, String callback) {
        try {
            queryServer = server;
            selectedServer();
            Map<String, Object> result = new HashMap<>();
            result.put("res", "0");
            result.put("channelItmes", channelItmes);
            result.put("platformItmes", platformItmes);
            printToJson(response, result, callback);
        } catch (Exception e) {
            e.printStackTrace();
            Map<String, Object> result = new HashMap<String, Object>();
            result.put("res", "1");
            result.put("msg", e.getMessage());
            printToJson(response, result, callback);
            return;
        }
    }

    @RequestMapping(value = "updateChannel.do", method = {RequestMethod.GET, RequestMethod.POST})
    public void updateChannel(HttpServletRequest request, HttpServletResponse response, String channel, String callback) {
        try {
            queryChannel = channel;
            updateServerItmes();
            Map<String, Object> result = new HashMap<>();
            result.put("res", "0");
            result.put("serverItmes", serverItmes);
            result.put("platformItmes", platformItmes);
            printToJson(response, result, callback);
        } catch (Exception e) {
            e.printStackTrace();
            Map<String, Object> result = new HashMap<String, Object>();
            result.put("res", "1");
            result.put("msg", e.getMessage());
            printToJson(response, result, callback);
            return;
        }
    }

    @RequestMapping(value = "updatePlatform.do", method = {RequestMethod.GET, RequestMethod.POST})
    public void updatePlatform(HttpServletRequest request, HttpServletResponse response, String platform, String callback) {
        try {
            queryPlatform = platform;
            updateChannelItmes();
            Map<String, Object> result = new HashMap<>();
            result.put("res", "0");
            result.put("serverItmes", serverItmes);
            result.put("channelItmes", channelItmes);
            printToJson(response, result, callback);
        } catch (Exception e) {
            e.printStackTrace();
            Map<String, Object> result = new HashMap<>();
            result.put("res", "1");
            result.put("msg", e.getMessage());
            printToJson(response, result, callback);
            return;
        }
    }

    @Override
    public void search() {

    }

    @Override
    protected String csvContent() {
        return null;
    }

    @Override
    protected String csvFileName() {
        return null;
    }

    public int getQueryTaskType() {
        return queryTaskType;
    }

    public void setQueryTaskType(int queryTaskType) {
        this.queryTaskType = queryTaskType;
    }

    public int getQueryTaskName() {
        return queryTaskName;
    }

    public void setQueryTaskName(int queryTaskName) {
        this.queryTaskName = queryTaskName;
    }

    public Map<String, String> getTaskTypeItmes() {
        return taskTypeItmes;
    }

    public void setTaskTypeItmes(Map<String, String> taskTypeItmes) {
        this.taskTypeItmes = taskTypeItmes;
    }

    public Map<String, String> getTaskTypeItmesRevise() {
        return taskTypeItmesRevise;
    }

    public void setTaskTypeItmesRevise(Map<String, String> taskTypeItmesRevise) {
        this.taskTypeItmesRevise = taskTypeItmesRevise;
    }

    public Map<String, String> getTaskNameItmes() {
        return taskNameItmes;
    }

    public void setTaskNameItmes(Map<String, String> taskNameItmes) {
        this.taskNameItmes = taskNameItmes;
    }

    public Map<String, String> getTaskNameItmesRevise() {
        return taskNameItmesRevise;
    }

    public void setTaskNameItmesRevise(Map<String, String> taskNameItmesRevise) {
        this.taskNameItmesRevise = taskNameItmesRevise;
    }

    public Map<String, String> getUiTaskNameItmes() {
        return uiTaskNameItmes;
    }

    public void setUiTaskNameItmes(Map<String, String> uiTaskNameItmes) {
        this.uiTaskNameItmes = uiTaskNameItmes;
    }

    public List<TaskGameManager.TaskActiveOrNewUserStatus> getActiveUserTaskCompleteds() {
        return activeUserTaskCompleteds;
    }

    public void setActiveUserTaskCompleteds(List<TaskGameManager.TaskActiveOrNewUserStatus> activeUserTaskCompleteds) {
        this.activeUserTaskCompleteds = activeUserTaskCompleteds;
    }

    public List<TaskGameManager.TaskActiveOrNewUserStatus> getNewUserTaskCompleteds() {
        return newUserTaskCompleteds;
    }

    public void setNewUserTaskCompleteds(List<TaskGameManager.TaskActiveOrNewUserStatus> newUserTaskCompleteds) {
        this.newUserTaskCompleteds = newUserTaskCompleteds;
    }

    public List<TaskGameManager.TaskActiveOrLossUserStayRadio> getActiveUserTaskStayRadios() {
        return activeUserTaskStayRadios;
    }

    public void setActiveUserTaskStayRadios(List<TaskGameManager.TaskActiveOrLossUserStayRadio> activeUserTaskStayRadios) {
        this.activeUserTaskStayRadios = activeUserTaskStayRadios;
    }

    public List<TaskGameManager.TaskActiveOrLossUserStayRadio> getNewUserTaskStayRadios() {
        return newUserTaskStayRadios;
    }

    public void setNewUserTaskStayRadios(List<TaskGameManager.TaskActiveOrLossUserStayRadio> newUserTaskStayRadios) {
        this.newUserTaskStayRadios = newUserTaskStayRadios;
    }

   /* public static Map<String, String> getTaskOpenLevel() {
        return taskOpenLevel;
    }

    public static void setTaskOpenLevel(Map<String, String> taskOpenLevel) {
        TaskGameAction.taskOpenLevel = taskOpenLevel;
    }*/

    public static Map<String, String> getTaskType() {
        return taskType;
    }

    public static void setTaskType(Map<String, String> taskType) {
        TaskGameAction.taskType = taskType;
    }

    public static Map<String, String> getTaskName() {
        return taskName;
    }

    public static void setTaskName(Map<String, String> taskName) {
        TaskGameAction.taskName = taskName;
    }

    public static String getTask_join_status() {
        return task_join_status;
    }

    public static void setTask_join_status(String task_join_status) {
        TaskGameAction.task_join_status = task_join_status;
    }

    public static String getTask_pass_status() {
        return task_pass_status;
    }

    public static void setTask_pass_status(String task_pass_status) {
        TaskGameAction.task_pass_status = task_pass_status;
    }

    public Date getDayDate() {
        return dayDate;
    }

    public void setDayDate(Date dayDate) {
        this.dayDate = dayDate;
    }

    /*111public Date getDayDate1() {
        return dayDate1;
    }

    public void setDayDate1(Date dayDate1) {
        this.dayDate1 = dayDate1;
    }

    public String getQueryPlatform1() {
        return queryPlatform1;
    }

    public void setQueryPlatform1(String queryPlatform1) {
        this.queryPlatform1 = queryPlatform1;
    }

    public String getQueryChannel1() {
        return queryChannel1;
    }

    public void setQueryChannel1(String queryChannel1) {
        this.queryChannel1 = queryChannel1;
    }

    public String getQueryServer1() {
        return queryServer1;
    }

    public void setQueryServer1(String queryServer1) {
        this.queryServer1 = queryServer1;
    }

    public Map<String, String> getPlatformItmes1() {
        return platformItmes1;
    }

    public void setPlatformItmes1(Map<String, String> platformItmes1) {
        this.platformItmes1 = platformItmes1;
    }

    public Map<String, String> getChannelItmes1() {
        return channelItmes1;
    }

    public void setChannelItmes1(Map<String, String> channelItmes1) {
        this.channelItmes1 = channelItmes1;
    }

    public Map<String, String> getServerItmes1() {
        return serverItmes1;
    }

    public void setServerItmes1(Map<String, String> serverItmes1) {
        this.serverItmes1 = serverItmes1;
    }

    public int getQueryTaskType1() {
        return queryTaskType1;
    }

    public void setQueryTaskType1(int queryTaskType1) {
        this.queryTaskType1 = queryTaskType1;
    }

    public int getQueryTaskName1() {
        return queryTaskName1;
    }

    public void setQueryTaskName1(int queryTaskName1) {
        this.queryTaskName1 = queryTaskName1;
    }

    public Map<String, String> getUiTaskNameItmes1() {
        return uiTaskNameItmes1;
    }

    public void setUiTaskNameItmes1(Map<String, String> uiTaskNameItmes1) {
        this.uiTaskNameItmes1 = uiTaskNameItmes1;
    }*/

    public ChartUIData getActiveUserTaskCompletedChart() {
        return activeUserTaskCompletedChart;
    }

    public void setActiveUserTaskCompletedChart(ChartUIData activeUserTaskCompletedChart) {
        this.activeUserTaskCompletedChart = activeUserTaskCompletedChart;
    }

    public ChartUIData getNewUserTaskCompletedChart() {
        return newUserTaskCompletedChart;
    }

    public void setNewUserTaskCompletedChart(ChartUIData newUserTaskCompletedChart) {
        this.newUserTaskCompletedChart = newUserTaskCompletedChart;
    }

    public List<TaskGameManager.TaskActiveOrNewUserStatus> getActiveUserTaskCompletedsTran() {
        return activeUserTaskCompletedsTran;
    }

    public void setActiveUserTaskCompletedsTran(List<TaskGameManager.TaskActiveOrNewUserStatus> activeUserTaskCompletedsTran) {
        this.activeUserTaskCompletedsTran = activeUserTaskCompletedsTran;
    }

    public List<TaskGameManager.TaskActiveOrNewUserStatus> getNewUserTaskCompletedsTran() {
        return newUserTaskCompletedsTran;
    }

    public void setNewUserTaskCompletedsTran(List<TaskGameManager.TaskActiveOrNewUserStatus> newUserTaskCompletedsTran) {
        this.newUserTaskCompletedsTran = newUserTaskCompletedsTran;
    }

    public ChartUIData getActiveUserTaskCompletedChartTran() {
        return activeUserTaskCompletedChartTran;
    }

    public void setActiveUserTaskCompletedChartTran(ChartUIData activeUserTaskCompletedChartTran) {
        this.activeUserTaskCompletedChartTran = activeUserTaskCompletedChartTran;
    }

    public ChartUIData getNewUserTaskCompletedChartTran() {
        return newUserTaskCompletedChartTran;
    }

    public void setNewUserTaskCompletedChartTran(ChartUIData newUserTaskCompletedChartTran) {
        this.newUserTaskCompletedChartTran = newUserTaskCompletedChartTran;
    }
}
